# -*- mode: Awk; -*-  vim: set filetype=awk : 
#
# This file is part of KNIT; copyright (C) 2010 by Tim Menzies
# tim@menzies.us.
#
# KNIT is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# KNIT is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with KNIT.  If not, see <http://www.gnu.org/licenses/>.


AWK Idioms

Here are some coding conventions for AWK coding in KINT

1. Use a Lot of Functions
=========================

Make extensive use of functions, rather than use AWK's top-level loop.
This will make reusing it in other applications.

2. Use lower case for local variables.
======================================

Label all your global variables as MixedCase.

Label all your locals with a leading lowerCase letter.

This convention makes it easier to find escaped globals. 

3. Use Less Globals
===================

Are evil. Sometimes, a necessary evil. But nevertheless, evil. Remember, N-1 globals is always better than N.

4. Spaced locals
==============

When defining local variables, add white space in front of their definition.

5.  Optional function arguments
================================

If some arguments  to a function are optional, the offer defaults




